package com.codefox.service;

import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.codefox.entity.TbDruggist;
import com.codefox.mapper.TbDruggistMapper;

/**
 * 药商信息服务层
 * 
 * @author puma
 * @date 2018年10月11日 上午9:53:28
 */
@Service
public class TbDruggistService {
	@Autowired
	SqlSessionFactory factory;
	
	public List<TbDruggist> listDruggist() {
		try(SqlSession sqlSession = factory.openSession()){
			return sqlSession.getMapper(TbDruggistMapper.class).listDruggist();
		}
	}
}
